package com.qihu.myapplication;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

/**
 * Created by cui on 2017/3/4.
 */

public class Activity_B extends AppCompatActivity {


    private TextView textViewv;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_b);
        textViewv = (TextView) findViewById(R.id.tv);

        int position = getIntent().getIntExtra("position", 0);
        textViewv.setText("position="+position);

        Intent intent = new Intent();
        intent.putExtra("position", position);
        setResult(101, intent);
    }

}
